package com.wqc.dynaproxy.cglib;

import com.wqc.dynaproxy.ForumServiceImpl;
import org.springframework.cglib.core.DebuggingClassWriter;

// 编写测试方法 ForumServiceTest
public class ForumServiceTest {

    public static void main(String[] args) {

        System.getProperties().put("sun.misc.ProxyGenerator.saveGeneratedFiles","true");
        System.setProperty(DebuggingClassWriter.DEBUG_LOCATION_PROPERTY, "D://");

        CglibProxy proxy = new CglibProxy();
        ForumServiceImpl forumService =
                (ForumServiceImpl)proxy.getProxy(ForumServiceImpl.class);
        forumService.removeTopic(1011);
        forumService.updateInfoById(567);
    }

}
